﻿using System;

namespace Shuba.Model
{
    public class SPADAFileInfo
    {

        public SPADAFileInfo()
        { }

        public SPADAFileInfo(DateTime DATE_FILE_UPLOAD, DateTime DATE_FILE_MODIFIED, double FILE_SIZE_UPLOAD, string PATH_FILE_UPLOAD, string NAME_FOLDER_UPLOAD, string FILE_NAME_UPLOAD, string ENTRY_BY, DateTime ENTRY_DATE, string UPDATE_BY, DateTime UPDATE_DATE, string ROWNUM)
        {
            this.DATE_FILE_UPLOAD = DATE_FILE_UPLOAD;
            this.DATE_FILE_MODIFIED = DATE_FILE_MODIFIED;
            this.FILE_SIZE_UPLOAD = FILE_SIZE_UPLOAD;
            this.PATH_FILE_UPLOAD = PATH_FILE_UPLOAD;
            this.NAME_FOLDER_UPLOAD = NAME_FOLDER_UPLOAD;
            this.FILE_NAME_UPLOAD = FILE_NAME_UPLOAD;
            this.ENTRY_BY = ENTRY_BY;
            this.ENTRY_DATE = ENTRY_DATE;
            this.UPDATE_BY = UPDATE_BY;
            this.UPDATE_DATE = UPDATE_DATE;
            this.ROWNUM = ROWNUM;
         }

        public SPADAFileInfo(DateTime DATE_FILE_UPLOAD, DateTime DATE_FILE_MODIFIED, double FILE_SIZE_UPLOAD, string PATH_FILE_UPLOAD, string NAME_FOLDER_UPLOAD, string FILE_NAME_UPLOAD, string ENTRY_BY, DateTime ENTRY_DATE, string UPDATE_BY, DateTime UPDATE_DATE, string ACT_TYPE, string ROWNUM)
        {
            this.DATE_FILE_UPLOAD = DATE_FILE_UPLOAD;
            this.DATE_FILE_MODIFIED = DATE_FILE_MODIFIED;
            this.FILE_SIZE_UPLOAD = FILE_SIZE_UPLOAD;
            this.PATH_FILE_UPLOAD = PATH_FILE_UPLOAD;
            this.NAME_FOLDER_UPLOAD = NAME_FOLDER_UPLOAD;
            this.FILE_NAME_UPLOAD = FILE_NAME_UPLOAD;
            this.ENTRY_BY = ENTRY_BY;
            this.ENTRY_DATE = ENTRY_DATE;
            this.UPDATE_BY = UPDATE_BY;
            this.UPDATE_DATE = UPDATE_DATE;
            this.ACT_TYPE = ACT_TYPE;
            this.ROWNUM = ROWNUM;
         }

        //REVISI
        public SPADAFileInfo(DateTime DATE_FILE_UPLOAD, DateTime DATE_FILE_MODIFIED, double FILE_SIZE_UPLOAD, string PATH_FILE_UPLOAD, string NAME_FOLDER_UPLOAD, string FILE_NAME_UPLOAD, string ENTRY_BY, DateTime ENTRY_DATE, string UPDATE_BY, DateTime UPDATE_DATE, string ROWNUM, string VERSION, Int64 CHECKSUM)
        {
            this.DATE_FILE_UPLOAD = DATE_FILE_UPLOAD;
            this.DATE_FILE_MODIFIED = DATE_FILE_MODIFIED;
            this.FILE_SIZE_UPLOAD = FILE_SIZE_UPLOAD;
            this.PATH_FILE_UPLOAD = PATH_FILE_UPLOAD;
            this.NAME_FOLDER_UPLOAD = NAME_FOLDER_UPLOAD;
            this.FILE_NAME_UPLOAD = FILE_NAME_UPLOAD;
            this.ENTRY_BY = ENTRY_BY;
            this.ENTRY_DATE = ENTRY_DATE;
            this.UPDATE_BY = UPDATE_BY;
            this.UPDATE_DATE = UPDATE_DATE;
            this.ROWNUM = ROWNUM;
            this.VERSION = VERSION;
            this.CHECKSUM = CHECKSUM;
            //dr.GetDateTime(0), dr.GetDateTime(1), dr.GetDouble(2), dr.GetString(3), dr.GetString(4), dr.GetString(5), dr.GetString(6), dr.GetDateTime(7), dr.GetString(8), dr.GetDateTime(9),dr.GetInt32(10), dr.GetString(11), dr.GetInt32(12)
        }

        public SPADAFileInfo(DateTime DATE_FILE_UPLOAD, DateTime DATE_FILE_MODIFIED, double FILE_SIZE_UPLOAD, string PATH_FILE_UPLOAD, string NAME_FOLDER_UPLOAD, string FILE_NAME_UPLOAD, string ENTRY_BY, DateTime ENTRY_DATE, string UPDATE_BY, DateTime UPDATE_DATE, string ACT_TYPE, string ROWNUM, string VERSION, Int64 CHECKSUM)
        {
            this.DATE_FILE_UPLOAD = DATE_FILE_UPLOAD;
            this.DATE_FILE_MODIFIED = DATE_FILE_MODIFIED;
            this.FILE_SIZE_UPLOAD = FILE_SIZE_UPLOAD;
            this.PATH_FILE_UPLOAD = PATH_FILE_UPLOAD;
            this.NAME_FOLDER_UPLOAD = NAME_FOLDER_UPLOAD;
            this.FILE_NAME_UPLOAD = FILE_NAME_UPLOAD;
            this.ENTRY_BY = ENTRY_BY;
            this.ENTRY_DATE = ENTRY_DATE;
            this.UPDATE_BY = UPDATE_BY;
            this.UPDATE_DATE = UPDATE_DATE;
            this.ACT_TYPE = ACT_TYPE;
            this.ROWNUM = ROWNUM;
            this.VERSION = VERSION;
            this.CHECKSUM = CHECKSUM;
            //dr.GetDateTime(0), dr.GetDateTime(1), dr.GetDouble(2), dr.GetString(3), dr.GetString(4), dr.GetString(5), dr.GetString(6), dr.GetDateTime(7), dr.GetString(8), dr.GetDateTime(9), dr.GetString(10),dr.GetInt32(11) ,dr.GetString(12), dr.GetInt32(13)

        }
        
        public SPADAFileInfo(DateTime GETDATE)
        {
            this.GETDATE = GETDATE;
        }
        public DateTime DATE_FILE_UPLOAD { get; set; }
        public DateTime DATE_FILE_MODIFIED { get; set; }
        public double FILE_SIZE_UPLOAD { get; set; }
        public string PATH_FILE_UPLOAD { get; set; }
        public string NAME_FOLDER_UPLOAD { get; set; }
        public string ENTRY_BY { get; set; }
        public DateTime ENTRY_DATE { get; set; }
        public string UPDATE_BY { get; set; }
        public DateTime UPDATE_DATE { get; set; }
        public string ACT_TYPE { get; set; }
        public DateTime GETDATE { get; set; }
        public string FILE_NAME_UPLOAD { get; set; }
        public string ROWNUM { get; set; }
        public string VERSION { get; set; }
        public Int64 CHECKSUM { get; set; }

        public override string ToString()
        {
            return
            DATE_FILE_UPLOAD.ToString("yyyy MMM dd hh:mm:ss") + " - " +
            DATE_FILE_MODIFIED.ToString("yyyy MMM dd hh:mm:ss") + " - " +
            FILE_SIZE_UPLOAD + " - " +
            PATH_FILE_UPLOAD + " - " +
            NAME_FOLDER_UPLOAD + " - " +
            ENTRY_BY + " - " +
            ENTRY_DATE.ToString("yyyy MMM dd hh:mm:ss") + " - " +
            UPDATE_BY + " - " +
            UPDATE_DATE.ToString("yyyy MMM dd hh:mm:ss") + " - " +
            GETDATE.ToString("yyyy MMM dd hh:mm:ss") + " - " +
            FILE_NAME_UPLOAD;
        }

        public string ToString4Audit()
        {
            return
            "DATE_FILE_UPLOAD: " + DATE_FILE_UPLOAD.ToString("yyyy MMM dd hh:mm:ss") +
            ", DATE_FILE_CREATED: " + DATE_FILE_MODIFIED.ToString("yyyy MMM dd hh:mm:ss") +
            ", FILE_SIZE_UPLOAD: " + FILE_SIZE_UPLOAD +
            ", PATH_FILE_UPLOAD: " + PATH_FILE_UPLOAD +
            ", NAME_FOLDER_UPLOAD: " + NAME_FOLDER_UPLOAD +
            ", ENTRY_BY: " + ENTRY_BY +
            ", ENTRY_DATE: " + ENTRY_DATE.ToString("yyyy MMM dd hh:mm:ss") +
            ", UPDATE_BY: " + UPDATE_BY +
            ", UPDATE_DATE: " + UPDATE_DATE.ToString("yyyy MMM dd hh:mm:ss");
        }

    }
}
